Designing and Programming Survey Forms

Data, Democracy & Development (DDD) summer field practice course

Ayush Patel

At Azim Premji University

11 May, 2025

Hello

I am Ayush.

I am a researcher working at the intersection of data, development and economics.

I am a RStudio (Posit) certified tidyverse Instructor.

I am a Researcher at Oxford Poverty and Human development Initiative (OPHI), at the University of Oxford.

Did you come prepared?

Do you have a SurveyCTO account? if not, register for a free account here

Please download the SurveyCTO Collect app on your phone

Learning Goals

Get a working understanding of how components of survey tech work.

Design and program a survey questionnaire to make it available for field use.

Extract the collected data for analyses.

Build an intuition on how to ask questions.

What we will not cover

Advanced methods of communicating with servers using API.

Data encryption for sensitive data.

Building data pipelines that extract, clean and present analyses.

Sampling theory, and analyses.

Components of survey tech

and how it works



But Why should I know this stupid tech stuff? 1

Manage Field Operations

SurveyCTo Server

Data Collection

Ennumerator1

Enum1 Collect App

Ennumerator2

Enum2 Collect App

Ennumerator3

Enum3 Collect App

SurveyCTO Server

Admin/Manager1

Admin/Manager1 Collect App

Admin/Manager1 Access to Server

Admin/Manager2

Admin/Manager2 Collect App

Admin/Manager2 Access to Server

Admin/Manager3

Admin/Manager3 Collect App

Admin/Manager3 Access to Server

Data Collection

SurveyCTo Server

Ennumerator1

Enum1 Collect App

Ennumerator2

Enum2 Collect App

Ennumerator3

Enum3 Collect App

SurveyCTO Server

Filled Forms

Filled Forms

Empty Forms

Empty Forms

Empty Forms

Empty Forms

Filled Forms

Filled Forms

Empty Forms

Filled Forms

Filled Forms

Empty Forms

Manage Field Operations

SurveyCTo Server

Admin/Manager1

Admin/Manager2

Admin/Manager3

Admin/Manager1 Collect App

Admin/Manager2 Collect App

Admin/Manager3 Collect App

Admin/Manager1 Access to Server

Admin/Manager2 Access to Server

Admin/Manager3 Access to Server

SurveyCTO Server

Empty Forms

Empty Forms

Empty Forms

Upload/Manage Forms and other files

Upload/Manage Forms and other files

Upload/Manage Forms and other files

Upload/Manage Forms and other files

Upload/Manage Forms and other files

Upload/Manage Forms and other files

Extract Collected Data

Extract Collected Data

Extract Collected Data

Extract Collected Data

Extract Collected data

Extract Collected data

Filled Forms

Filled Forms

Empty Forms

Filled Forms

Filled Forms

Empty Forms

Filled Forms

Filled Forms

Empty Forms

Manage Field Operations

Data Collection

SurveyCTo Server

Admin/Manager1

Admin/Manager2

Admin/Manager3

Admin/Manager1 Collect App

Admin/Manager2 Collect App

Admin/Manager3 Collect App

Admin/Manager1 Access to Server

Admin/Manager2 Access to Server

Admin/Manager3 Access to Server

Ennumerator1

Enum1 Collect App

Ennumerator2

Enum2 Collect App

Ennumerator3

Enum3 Collect App

SurveyCTO Server

Filled Forms

Filled Forms

Empty Forms

Empty Forms

Empty Forms

Empty Forms

Empty Forms

Empty Forms

Empty Forms

Filled Forms

Filled Forms

Empty Forms

Filled Forms

Filled Forms

Empty Forms

Upload/Manage Forms and other files

Upload/Manage Forms and other files

Upload/Manage Forms and other files

Upload/Manage Forms and other files

Upload/Manage Forms and other files

Upload/Manage Forms and other files

Extract Collected Data

Extract Collected Data

Extract Collected Data

Extract Collected Data

Extract Collected data

Extract Collected data

Filled Forms

Filled Forms

Empty Forms

Filled Forms

Filled Forms

Empty Forms

Filled Forms

Filled Forms

Empty Forms

Reckless Learning-1 (20-30 Mins)

  • For a group of 5-7 members. (2 mins)
  • Navigate to your own SurveyCTO console. Explore the Design, Collect, Monitor, Export and Configure tabs. (3 mins)
  • Choose one person from your group. We will use their SurveyCTO server for this exercise. (1 min)
  • Add the remaining members as team to the chosen one’s server. (3 min)
  • All members to login to the chosen server workspace in the SurveyCTO Collect App. (2 mins)
  • Using the Design tab in server console, upload this form. Only to be carried out on the chosen one’s server. (3 mins)
  • Use the SurveyCTO Collect app to get the blank form. (2 mins)
  • Use the SurveyCTO Collect app to record data using the new for for as many people as you can. (5 mins)
  • Use the SurveyCTO Collect app to submit the collected forms. (2 mins)
  • Go to the console of the chosen one’s server. In the Export tab, find the submitted data. Get this data and take a look. (5 mins)

Great Job. We will now explore several available features for designing survey forms.

Form Definition.

The Bare Bones

Say, there is only one single question. Nothing else is of interest to you. Everyone and anyone can be asked this question.

What would the form definition then look like?

First (name,label), you need the exact phrasing of the question.

Second (type), what is the type of answer that you expect and accept? (a number, a date, an image?)

Third (constraint), any reasonable constraints on the answers? (an age range, a date range ?)

Reckless Learning-2 (5 mins)

Create a copy of the file from the previous example.

Rename the file.

Open the newly renamed file. Remove all rows except the title rows from the survey sheet.

As discussed in the previous slide, add a single question in the survey sheet. Populate all necessary columns.

Remove all rows except the title row from the choices sheet.

Add row in choices sheet if needed.

Change the form title, and form ID in the settings sheet.

Upload the form on your server and test.

Great Job. We will slowly add more complexity to our forms.

Before we move ahead..

  • I shall introduce the Documentation Home page for SurveyCTO. Home Docs
  • Some important webpages of the documentation to keep at hand while you create form definitions.Core, Additioinal, Advanced

Expressions

Why?

Lets us calculate on the fly, apply conditional flows to questions, and validate answers.

There are two important ideas from the syntax point of view

First, referring to the value of a specific field.

Second, referring to the values the current field.

We shall look at how these are used.

Expressions

In the trivial-biryani-survey I use ${enrolled} = 1 to ensure that questions are asked to respondents that report to be enrolled in college.

I also use .>16 and .<130 to ensure age values are validated? Do you think my range is a reasonable one?

Can you find other instances in the biryani survey where I use such expression?

How is the $ operator different from the . operator?

See this page to browse through applying other logical and mathematical operations.

Constraints

The need to restrict answers to a reasonable set of options or numbers.

How many people live in your house: “56”

The constraints are implemented in the constraint column of the form definition

The constraints can be accompanied with a message for the enumerator. This can be done using the constraint message column of the form definition

Can you find the constraint implemented in the trivial-biryani-survey for number of times a respondent consumes biryani in a week?

Relevance

It is usually of interest to see how certain people answer a question of our interest.

We can use expressions to change the flow of the survey questions so that we ask the right question to the right people.

expressions are provided in the relevance column for a question or group of questions.

Continue only on consent is the common, important, and easiest to implement relevance that is found in all decent surveys.

In the trivial-biryani-survey see the relevance column to see an example.

Reckless Learning-3 (25-30 mins)

Create a form definition for a door-to-door household interview.

You are broadly interested in the access to banking and spending autonomy of stay-at-home married women.

You want to capture details of education, age, marital status,age at marriage of the target group and their spouse.

You want information on holding a bank account, debit cards, credit cards, UPI for the target group and their spouse.

For the target group you want to record who opened their account, Did they open an (additional or new) account after marriage.

Does the target group have any sources of income/savings independent of their spouse.

How often does the target group spend on indulgence expenses (not for their kids education, not for HH expenses, etc) only for themselves. Ask for reasons if they dont.

Begin by making a flow chart of questions, phrase the questions, use constraints and relevance as required.

Upload the form on SurveyCTO and test it, does it work as expected?